package entity;

import java.util.ArrayList;
import java.util.Collection;
import javax.ejb.CreateException;
import javax.ejb.EJBLocalHome;
import javax.ejb.FinderException;
import transfer.Order;
import transfer.User;

/**
 *
 * @author Oleh
 */
public interface OrdersLocalHome extends EJBLocalHome {

    public OrdersLocal findByPrimaryKey(Integer idOrder) throws FinderException;

    public OrdersLocal create(Order order) throws CreateException;

    public Collection findAllUndelivered() throws FinderException;
    
    public Collection findAllShipping(User user) throws FinderException;
    
    public Collection findAllQueued(User user) throws FinderException;

    boolean isCartExist(User user);

    OrdersLocal findCart(User user) throws FinderException;

    Collection findAllOrdersForUser(User user) throws FinderException;
    /**
     * 
     * @param filters
     * @param orderBy
     * @param startRow
     * @param quantity
     * @return
     * @throws FinderException 
     */
    Collection findOrdersReport(ArrayList filters, String orderBy, Integer startRow, Integer quantity) throws FinderException;
}
